package soccer.action;

import java.util.List;

import soccer.model.goals.GoalDAOImpl;
import soccer.model.leagueTable.LeagueTableDAOImpl;
import soccer.model.player.Player;
import soccer.model.player.PlayerDAOImpl;

public class StatisticActions {
   public List getLeaguTableOfWeek(int week){
     LeagueTableDAOImpl leagueTableDAOImpl = new LeagueTableDAOImpl();
     List leagueTableMapList = leagueTableDAOImpl.getLeagueTablesByWeek(week);
	 return leagueTableMapList;
   }
   public List getMostScorerPlayers(){
   GoalDAOImpl goalDAOImpl = new GoalDAOImpl();
   List mostScorerList = goalDAOImpl.getMostGoalsNumberOfPlayer();
   return mostScorerList;
   }
   public List getMatchPlayerPlayed(String name  , String surname){
	   Player p = new Player(name, surname);
	   PlayerDAOImpl playerDAOImpl = new PlayerDAOImpl();
	   List playerPlayedMatchList = playerDAOImpl.getMatchOfPlayerPlayed(p);
	   return playerPlayedMatchList;
   }
   public List getMatchPlayerHaveGoal(String name  , String surname){
	   Player p = new Player(name, surname);
	   PlayerDAOImpl playerDAOImpl = new PlayerDAOImpl();
	   List playerPlayedMatchList = playerDAOImpl.getPlayerHaveGoals(p);
	   return playerPlayedMatchList;
   }
   public List winNumberOfTeams(int week){
	   LeagueTableDAOImpl leagueTableDAOImpl  = new LeagueTableDAOImpl();
	   List list = leagueTableDAOImpl.getWinNumberOfTeams(week);
	   return list;
   }
   public List lostNumberOfTeams(int week){
	   LeagueTableDAOImpl leagueTableDAOImpl  = new LeagueTableDAOImpl();
	   List list = leagueTableDAOImpl.getLostNumberOfTeams(week);
	   return list;
   }
   public List mostGoalTeam (int week){
	   LeagueTableDAOImpl leagueTableDAOImpl  = new LeagueTableDAOImpl();
	   List list = leagueTableDAOImpl.getMostGoalsNumberOfTeams(week);
	   return list;
   }
   public List mostGoalAgainstTeam(int week){
	   LeagueTableDAOImpl leagueTableDAOImpl  = new LeagueTableDAOImpl();
	   List list = leagueTableDAOImpl.getMostGoalAgainstNumberOfTeams(week);
	   return list;
   }
  
   public int getTotalWeek(){
	   LeagueTableDAOImpl leagueTableDAOImpl = new LeagueTableDAOImpl();
	   List list = leagueTableDAOImpl.getWeekNumberOfLeagueTable();
	   return list.size();
   }
}
